package com.studyv3.test.domain.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.studyv3.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * lb_库存表
 * </p>
 *
 * @author author
 * @since 2024-05-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("lb_stock")
@ApiModel(value="Stock对象", description="lb_库存表")
public class StockVo implements Serializable {

    private static final long serialVersionUID = 1L;
    @Excel(name = "序号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Excel(name = "物品id")
    @ApiModelProperty(value = "物品id")
    @TableField("products_id")
    private Integer productsId;

    @Excel(name = "物品名称")
    @ApiModelProperty(value = "物品名称")
    @TableField(exist=false)
    private String productsName;

    @Excel(name = "批次id")
    @ApiModelProperty(value = "批次id")
    @TableField("batch_id")
    private Integer batchId;

    @Excel(name = "批次名称")
    @ApiModelProperty(value = "批次名称")
    @TableField(exist=false)
    private String batchName;

    @Excel(name = "物品数量")
    @ApiModelProperty(value = "物品数量")
    @TableField("products_num")
    private Long productsNum;

    @Excel(name = "报废申请的数量")
    @ApiModelProperty(value = "待报废的数量")
    @TableField("products_unqualified")
    private Long productsUnqualified;

    @Excel(name = "领用申请中的数量")
    @ApiModelProperty(value = "申请中的数量")
    @TableField("products_apply")
    private Long productsApply;

    @Excel(name = "到期日期")
    @TableField("end_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime endDate;

    @Excel(name = "入库日期")
    @TableField("warehous_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime warehousDate;
}
